import request from '@/utils/request'

// 获取店铺
export const selectShop = () => {
  return request({
    method: 'GET',
    url: '/shop/page/0/10'
  })
}

// 修改店铺信息
export const updateShopInfo = data => {
  return request({
    method: 'PUT',
    url: '/shop/update',
    data
  })
}

// 修改店铺信息
export const editShop = data => {
  return request({
    method: 'PUT',
    url: '/shop/update',
    data
  })
}
// 根据id删除店铺
export const delShop = id => {
  return request({
    method: 'DELETE',
    url: `/shop/delete/${id}`
  })
}

// 通过店铺名查询
export const selectShopByName = data => {
  return request({
    method: 'GET',
    url: '/shop/search/admin',
    data
  })
}
// 通过商家id查询店铺内容
export const shopByUser = id => {
  return request({
    method: 'GET',
    url: `/shop/search/seller/${id}`
  })
}
